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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.q: D = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.y: C = None
        self.s: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
b = D("b")
f = E("f")
n = F("n")
g = D("g")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.q: D = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.y: C = None
        self.s: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
b = D("b")
f = E("f")
n = F("n")
g = D("g")
e = F("e")

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