class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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