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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.u: B = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

l = A("l")
h = B("h")
b = C("b")
c = D("c")
j = E("j")
i = F("i")
d = F("d")
g = A("g")

l.p = j
l.w = b
l.z = h
h.w = g
h.p = c
h.o = b
h.u = b
b.u = g
b.s = j
c.z = g
c.u = i
c.p = h
c.o = j
j.r = i
j.s = h
j.z = h
i.s = c
i.r = b
i.y = b
i.u = h
i.q = d
d.s = c
d.r = b
d.y = b
d.u = h
d.q = i
g.p = j
g.w = b
g.z = h
assert c.u.u.w.p.r.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: C = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.u: B = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

l = A("l")
h = B("h")
b = C("b")
c = D("c")
j = E("j")
i = F("i")
d = F("d")
g = A("g")

l.p = j
l.w = b
l.z = h
h.w = g
h.p = c
h.o = b
h.u = b
b.u = g
b.s = j
c.z = g
c.u = i
c.p = h
c.o = j
j.r = i
j.s = h
j.z = h
i.s = c
i.r = b
i.y = b
i.u = h
i.q = d
d.s = c
d.r = b
d.y = b
d.u = h
d.q = i
g.p = j
g.w = b
g.z = h
assert c.u.u.w.p.r.y.s.txt == "j"