class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.p: D = None
        self.r: C = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.q: A = None
        self.v: E = None
        self.w: F = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: H = None
        self.q: E = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.x: A = None
        self.txt = txt

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

j.u = f
j.t = e
j.x = e
j.p = a
j.v = a
j.r = d
k.y = a
k.s = a
k.r = j
k.q = j
k.v = e
k.w = f
k.x = f
l.r = j
a.s = l
e.w = k
e.s = j
e.q = j
e.u = b
e.p = b
f.z = j
f.t = j
f.p = g
f.q = e
b.x = a
b.z = a
b.q = a
b.p = e
b.y = l
b.u = d
b.r = g
g.w = d
g.s = b
g.x = j
d.r = j
assert l.r.x.u.r.s.p.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.p: D = None
        self.r: C = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.q: A = None
        self.v: E = None
        self.w: F = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: H = None
        self.q: E = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.x: A = None
        self.txt = txt

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

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