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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.p: F = None
        self.o: G = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: B = None
        self.v: H = None
        self.x: B = 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.r: A = None
        self.o: C = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.p: F = None
        self.o: G = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: B = None
        self.v: H = None
        self.x: B = 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.r: A = None
        self.o: C = None
        self.q: F = None
        self.txt = txt

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

b.y = l
b.t = d
b.p = d
h.u = d
h.o = d
h.r = l
h.s = l
h.p = f
h.y = n
a.q = h
a.y = d
a.o = b
l.u = d
l.y = g
l.w = a
n.s = g
n.r = b
n.o = b
n.q = d
f.s = g
f.v = g
f.q = h
f.x = h
d.u = a
g.r = k
g.o = a
g.q = f
k.y = l
k.t = d
k.p = d
assert k.y.y.q.s.txt == "g"