class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.y: F = None
        self.w: H = None
        self.q: D = None
        self.z: E = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.z: H = None
        self.s: D = None
        self.o: D = None
        self.t: G = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: H = None
        self.o: A = None
        self.s: H = None
        self.x: F = None
        self.w: H = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.z: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.p: B = None
        self.x: A = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.u: F = None
        self.p: E = None
        self.x: F = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

b = A("b")
h = B("h")
f = C("f")
l = D("l")
i = E("i")
d = F("d")
g = G("g")
e = H("e")
c = A("c")
j = B("j")

b.r = g
b.t = l
b.q = l
b.y = d
b.u = d
b.w = e
b.z = i
b.s = f
h.u = g
h.t = g
h.p = d
h.w = d
h.z = e
h.s = l
h.o = l
h.r = j
f.p = j
f.q = e
f.s = e
f.w = e
f.o = c
f.x = d
f.v = h
f.z = i
l.y = e
l.r = e
l.z = j
l.v = f
l.p = d
i.o = f
i.s = f
i.p = j
i.x = c
i.t = h
i.q = d
d.u = l
d.q = l
d.x = g
g.v = j
g.s = j
g.r = l
g.u = d
g.x = d
g.p = i
g.t = f
e.w = f
c.r = g
c.t = l
c.q = l
c.y = d
c.u = d
c.w = e
c.z = i
c.s = f
j.u = g
j.t = g
j.p = d
j.w = d
j.z = e
j.s = l
j.o = l
j.r = h
assert c.s.z.s.s.w.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.y: F = None
        self.w: H = None
        self.q: D = None
        self.z: E = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.z: H = None
        self.s: D = None
        self.o: D = None
        self.t: G = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: H = None
        self.o: A = None
        self.s: H = None
        self.x: F = None
        self.w: H = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.z: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.p: B = None
        self.x: A = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.u: F = None
        self.p: E = None
        self.x: F = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

b = A("b")
h = B("h")
f = C("f")
l = D("l")
i = E("i")
d = F("d")
g = G("g")
e = H("e")
c = A("c")
j = B("j")

b.r = g
b.t = l
b.q = l
b.y = d
b.u = d
b.w = e
b.z = i
b.s = f
h.u = g
h.t = g
h.p = d
h.w = d
h.z = e
h.s = l
h.o = l
h.r = j
f.p = j
f.q = e
f.s = e
f.w = e
f.o = c
f.x = d
f.v = h
f.z = i
l.y = e
l.r = e
l.z = j
l.v = f
l.p = d
i.o = f
i.s = f
i.p = j
i.x = c
i.t = h
i.q = d
d.u = l
d.q = l
d.x = g
g.v = j
g.s = j
g.r = l
g.u = d
g.x = d
g.p = i
g.t = f
e.w = f
c.r = g
c.t = l
c.q = l
c.y = d
c.u = d
c.w = e
c.z = i
c.s = f
j.u = g
j.t = g
j.p = d
j.w = d
j.z = e
j.s = l
j.o = l
j.r = h
assert c.s.z.s.s.w.o.r.txt == "g"