class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: H = None
        self.y: H = None
        self.t: E = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

c = A("c")
d = B("d")
m = C("m")
a = D("a")
j = E("j")
g = F("g")
n = G("n")
e = H("e")
f = C("f")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

c = A("c")
d = B("d")
m = C("m")
a = D("a")
j = E("j")
g = F("g")
n = G("n")
e = H("e")
f = C("f")

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