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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.s: H = None
        self.z: A = None
        self.t: D = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.x: A = None
        self.u: E = None
        self.o: H = None
        self.s: E = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.x: H = None
        self.y: E = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.t: C = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

f = A("f")
i = B("i")
c = C("c")
b = D("b")
l = E("l")
e = F("e")
h = G("h")
n = H("n")
d = E("d")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.s: H = None
        self.z: A = None
        self.t: D = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.x: A = None
        self.u: E = None
        self.o: H = None
        self.s: E = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.x: H = None
        self.y: E = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.t: C = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

f = A("f")
i = B("i")
c = C("c")
b = D("b")
l = E("l")
e = F("e")
h = G("h")
n = H("n")
d = E("d")
j = F("j")

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