class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.o: A = None
        self.x: C = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: F = None
        self.y: B = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.p: A = None
        self.z: A = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

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

i.y = b
i.x = b
i.v = g
i.o = j
i.u = j
g.x = m
g.s = n
g.y = i
b.o = n
b.u = a
n.w = b
a.o = m
a.v = m
a.y = g
a.u = b
a.q = i
m.x = n
m.v = n
m.w = j
m.z = j
m.p = i
m.o = e
e.x = n
e.v = n
e.w = i
e.p = i
e.z = j
e.o = m
j.y = b
j.x = b
j.v = g
j.o = i
j.u = i
assert j.y.o.w.u.y.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.o: A = None
        self.x: C = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: F = None
        self.y: B = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.p: A = None
        self.z: A = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

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

i.y = b
i.x = b
i.v = g
i.o = j
i.u = j
g.x = m
g.s = n
g.y = i
b.o = n
b.u = a
n.w = b
a.o = m
a.v = m
a.y = g
a.u = b
a.q = i
m.x = n
m.v = n
m.w = j
m.z = j
m.p = i
m.o = e
e.x = n
e.v = n
e.w = i
e.p = i
e.z = j
e.o = m
j.y = b
j.x = b
j.v = g
j.o = i
j.u = i
assert j.y.o.w.u.y.x.z.txt == "j"