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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: A = None
        self.v: E = None
        self.u: E = None
        self.y: H = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.q: A = None
        self.r: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: A = None
        self.v: E = None
        self.u: E = None
        self.y: H = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.q: A = None
        self.r: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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