class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.y: B = None
        self.t: F = None
        self.r: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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