class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.x: B = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

j.w = h
j.t = h
j.o = h
j.x = c
j.y = f
c.p = n
c.w = n
h.x = m
h.t = f
h.p = c
h.z = b
i.y = c
i.v = e
f.p = c
f.r = c
f.t = c
f.z = i
m.t = f
m.y = b
m.r = c
m.u = h
m.z = h
m.s = j
b.t = n
b.y = m
b.r = c
b.u = h
b.z = h
b.s = j
e.y = c
e.v = i
n.p = c
n.r = c
n.t = c
n.z = e
assert f.t.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.x: B = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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