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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: A = None
        self.v: B = None
        self.x: G = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.v: G = None
        self.o: F = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: A = None
        self.v: B = None
        self.x: G = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.v: G = None
        self.o: F = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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