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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.q: C = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.u: E = None
        self.w: G = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.q: C = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.u: E = None
        self.w: G = None
        self.v: D = None
        self.txt = txt

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

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