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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.s: C = None
        self.x: C = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

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

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

m = A("m")
f = B("f")
l = C("l")
i = D("i")
h = E("h")
c = F("c")
e = A("e")
j = D("j")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.s: C = None
        self.x: C = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

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

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

m = A("m")
f = B("f")
l = C("l")
i = D("i")
h = E("h")
c = F("c")
e = A("e")
j = D("j")
d = B("d")

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