class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: F = None
        self.o: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

l = A("l")
i = B("i")
a = C("a")
h = D("h")
f = E("f")
m = F("m")
b = C("b")

l.o = a
l.z = m
i.s = l
i.y = l
i.x = m
i.p = m
i.o = m
i.z = a
a.t = m
a.y = m
a.v = f
a.u = i
a.p = b
a.z = l
h.p = f
h.v = f
h.y = m
h.o = m
f.q = b
f.t = l
f.x = l
m.o = b
m.w = l
m.v = l
m.r = h
b.t = m
b.y = m
b.v = f
b.u = i
b.p = a
b.z = l
assert h.y.v.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: F = None
        self.o: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

l = A("l")
i = B("i")
a = C("a")
h = D("h")
f = E("f")
m = F("m")
b = C("b")

l.o = a
l.z = m
i.s = l
i.y = l
i.x = m
i.p = m
i.o = m
i.z = a
a.t = m
a.y = m
a.v = f
a.u = i
a.p = b
a.z = l
h.p = f
h.v = f
h.y = m
h.o = m
f.q = b
f.t = l
f.x = l
m.o = b
m.w = l
m.v = l
m.r = h
b.t = m
b.y = m
b.v = f
b.u = i
b.p = a
b.z = l
assert h.y.v.z.r.txt == "h"