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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.z: H = None
        self.w: C = None
        self.x: B = None
        self.v: H = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.r: E = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.u: A = None
        self.r: F = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: G = None
        self.u: A = None
        self.p: B = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
l = D("l")
k = E("k")
m = F("m")
n = G("n")
f = H("f")

g.u = l
b.t = n
b.y = l
b.p = f
b.w = j
j.w = n
j.y = n
j.r = n
j.o = f
j.q = f
j.x = g
l.o = g
l.s = g
l.z = f
l.v = f
l.w = j
l.x = b
l.r = m
k.r = g
k.y = m
m.s = n
m.v = f
m.r = k
m.u = g
m.x = j
n.p = b
n.q = m
n.r = m
n.u = g
n.x = g
f.y = g
f.u = g
f.x = n
f.p = b
assert b.w.o.x.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.z: H = None
        self.w: C = None
        self.x: B = None
        self.v: H = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.r: E = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.u: A = None
        self.r: F = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: G = None
        self.u: A = None
        self.p: B = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
l = D("l")
k = E("k")
m = F("m")
n = G("n")
f = H("f")

g.u = l
b.t = n
b.y = l
b.p = f
b.w = j
j.w = n
j.y = n
j.r = n
j.o = f
j.q = f
j.x = g
l.o = g
l.s = g
l.z = f
l.v = f
l.w = j
l.x = b
l.r = m
k.r = g
k.y = m
m.s = n
m.v = f
m.r = k
m.u = g
m.x = j
n.p = b
n.q = m
n.r = m
n.u = g
n.x = g
f.y = g
f.u = g
f.x = n
f.p = b
assert b.w.o.x.u.u.txt == "l"