class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.v: E = None
        self.y: C = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

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

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

i = A("i")
j = B("j")
g = C("g")
a = D("a")
k = E("k")
m = F("m")
n = E("n")
l = E("l")
c = F("c")

i.x = a
i.w = a
i.u = a
j.v = a
g.o = j
g.t = j
a.s = j
a.w = j
a.p = i
a.v = n
a.y = g
a.z = m
k.x = j
k.u = a
m.y = a
n.x = j
n.u = a
l.x = j
l.u = a
c.y = a
assert j.v.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.v: E = None
        self.y: C = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

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

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

i = A("i")
j = B("j")
g = C("g")
a = D("a")
k = E("k")
m = F("m")
n = E("n")
l = E("l")
c = F("c")

i.x = a
i.w = a
i.u = a
j.v = a
g.o = j
g.t = j
a.s = j
a.w = j
a.p = i
a.v = n
a.y = g
a.z = m
k.x = j
k.u = a
m.y = a
n.x = j
n.u = a
l.x = j
l.u = a
c.y = a
assert j.v.p.u.txt == "a"