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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.o: A = None
        self.v: E = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: G = None
        self.x: C = None
        self.v: H = None
        self.w: H = None
        self.t: D = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.p: A = None
        self.s: G = None
        self.q: C = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.o: A = None
        self.v: E = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: G = None
        self.x: C = None
        self.v: H = None
        self.w: H = None
        self.t: D = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.p: A = None
        self.s: G = None
        self.q: C = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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